The reason for a string with a space in a table1, spaces are spaces.2, data is fetched from other systems, files, imported into SQL Server table, because the source data there is a special character display space.Second, the solutionIn the first
1, LTRIM ()---Remove the space to the left of the column values as follows:Select * from where tno='t003' and CNO='c0013 'We find that there is a space at the far left of the CNAME column value for this row of data, for the accuracy of the data,
The tool used here is rlwrap.You can learn more about http://utopia.knoware.nl/~hlub/uck/rlwrap/in this linkwget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.42.tar.gzYum install-y ReadLine Readline-devel This is dependent on theTar XF rlwrap-0
MySQL fuzzy query to remove the space problem??
$sql = "Select MINGC from info WHERE 1=1";
Fuzzy judgment
if ($MINGC! = "") {
$sql. = "and MINGC like '% $MINGC% '";
}
How to remove a space when the name text box blurs a query "trim ($MINGC) can
optimization | statement | execution
5th. Oracle's execution planbackground knowledge: To better carry out the following, we must understand some conceptual terms: Sharing SQL statementsIn order not to parse the same SQL statement repeatedly
A table that may be involved in an SQL statement:Studentinfo:PersonInfo:Test_outjoin:Test2_outjoin:Two basic SQL syntaxif exists (SELECT * from dbo.sysobjects where name= ' Studentinfo ')--query The view that exists in the database if the table is
Summary of standard SQL statementsStandard SQL statement Summary, the standard SQL language is basically applicable to the database software listed below-----------------------------------------------------------------------------Database Software
in-range lookup for SQL(1) Between.....and usageUsually we look for a record in a fixed area, and can write SQL statements using >=,1 SELECT * from Sales.ordervalues2 where val>=1000 and valQuery Result:The sales.ordervalues here comes from a
Original: "SQL" a reliable trim function, a bonus processSQL has LTrim and RTrim These two functions are used to remove the first and trailing whitespace of the string, the absence of common trim functions can be removed at the same time, and the
1.Writing format specification1-1. Unification of size text and space1-2, the date format is clear1-3. Use of BIND variables1-4. Use of table aliases1-5. Try to avoid retrieving unnecessary columns when retrieving1-6. The ORDER by column expressly
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.